﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress.Web.ASPxGridView;

namespace UdrinkWater_Project.Admin
{
    public partial class UnpaidList : System.Web.UI.Page
    {
        string Connection = ConfigurationManager.ConnectionStrings["DB_Udrink"].ConnectionString;
        protected void Page_Load(object sender, EventArgs e)
        {
            //GV_Addunpaid.DataBind();
            //for (int i = 0; i < GV_Addunpaid.VisibleRowCount; i++)
            //{
            //    LinkButton Detial = (LinkButton)GV_Addunpaid.FindRowCellTemplateControl(i, (GridViewDataColumn)GV_Addunpaid.Columns["colMyColumn"], "LinkButton1");
            //    object Status = GV_Addunpaid.GetRowValues(i, "Status_Unpaid");
            //    if (Convert.ToInt32(Status) == 2)
            //    {
            //        Detial.Visible = true;
            //    }
            //    else
            //    {
            //        Detial.Visible = false;
            //    }
            //}
        }

        protected void bt_AddUnpaid_Click(object sender, EventArgs e)
        {
            Response.Redirect("AddList_Unpaid.aspx");
        }

        protected void GV_Addunpaid_RowCommand(object sender, ASPxGridViewRowCommandEventArgs e)
        {
            if (e.CommandArgs.CommandName == "Cmd_Detial")
            {
                string Ref = e.CommandArgs.CommandArgument.ToString();
                Session["Referent"] = Ref;
                Response.Redirect("Referent_Unpaid.aspx");
            }
        }
        
       

    }
}